package com.shenjinzheng.apply.controller;

import com.shenjinzheng.apply.dto.MerchantApplyDTO;
import com.shenjinzheng.apply.dto.StoreApplyDTO;
import com.shenjinzheng.apply.entity.StoreApply;
import com.shenjinzheng.apply.service.StoreApplyService;
import com.shenjinzheng.common.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 店铺入驻申请表 前端控制器
 * </p>
 *
 * @author shenjinzheng
 * @since 2024-11-10
 */
@Tag(name = "店铺管理", description = "店铺入驻申请和审批相关接口")
@RestController
@RequestMapping("/storeApply")
public class StoreApplyController {

    @Resource
    private StoreApplyService storeApplyService;

    @PostMapping
    @Operation(summary = "店铺入驻申请")
    public Result<Object> apply(@RequestBody StoreApply storeApply){
        storeApplyService.apply(storeApply);
        return Result.success();
    }

    @PutMapping
    @Operation(summary = "店铺入驻审批")
    public Result<Object> approval(@RequestBody StoreApplyDTO storeApplyDTO){
        storeApplyService.approval(storeApplyDTO);
        return Result.success();
    }


}
